package com.dingup.homework.feign.client.classInfo;


import com.dingup.api.adapter.classInfo.ClassInfoAdapter;
import com.dingup.api.bean.query.classInfo.ClassInfoForPkBean;
import com.dingup.api.bean.response.SelectBean;
import com.dingup.api.bean.response.classInfo.ClassInfoResponseSelectBean;
import com.dingup.api.model.classInfo.ClassInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @author jun 2018/11/14
 */
@Component
@FeignClient(value = "p-innermgrweb") //这里的name对应调用服务的spring.applicatoin.name
public interface ClassInfoFeignClient {

    @RequestMapping(value = "/feign/class_info/get_studentIds_by_teacherId.do", method = RequestMethod.POST)
    List<String> getClassStudentIds(@RequestParam("teacherId") String teacherId);

    @RequestMapping(value = "/feign/class_info/get_class_info_select_bean.do", method = RequestMethod.POST)
    List<ClassInfoResponseSelectBean> getClassInfoSelectBean();

    @RequestMapping(value = "/feign/class_info/get_class_info_by_id.do", method = RequestMethod.POST)
    ClassInfoAdapter getClassInfoById(@RequestParam("classId") Integer classId);

    @RequestMapping(value = "/feign/class_info/get_class_info_for_pk_screen.do", method = RequestMethod.POST)
    public List<ClassInfo> getClassInfoForPkScreen(ClassInfoForPkBean bean);

    @RequestMapping(value = "/feign/class_info/get_simple_class_info_by_class_id.do", method = RequestMethod.POST)
    public ClassInfo getSimpleClassInfo(@RequestParam("classId") Integer classId);

    @RequestMapping(value = "/feign/class_info/get_all_class_info_select_bean.do", method = RequestMethod.POST)
    public List<SelectBean> getAllClassInfoSelectBean();
}
